<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQuestionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('questions', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('question_form')->comment('题目形式（选择填空）');
            $table->integer('question_type')->comment('题目类型（分类）');
            $table->string('graph', 80)->nullable()->comment('题目图片');
            $table->string('ask', 200)->comment('题目问题题面');
            $table->text('options')->comment('选项（json格式）');
            $table->string('answer', 200)->comment('答案');
            $table->unsignedInteger('author_id')->comment('出题人id');
            $table->integer('status')->comment('题目状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('questions');
    }
}
